from django.conf.urls import url
from django.urls import path
from rest_framework.routers import DefaultRouter

from api.views import CarView, RecordViewSet, get_provinces, get_districts

urlpatterns = [
    path('districts/', get_provinces),
    path('districts/<int:distid>/', get_districts),
    path('cars/', CarView.as_view()),
    path('cars/<int:pk>/', CarView.as_view()),
]

router = DefaultRouter()
router.register('records', RecordViewSet)

urlpatterns += router.urls
